<html xmlns="http://www.w3.org/1999/xhtml" id="http">
<head>
    <title>Server management and Comunication</title>
</head>

<body>

<h1>Server management and Comunication</h1>
 
<todo>
Placeholder chapter for topics having to do with server administration and communication over http(s).
</todo>

<!--=========================================================================-->
<!-- Major sub-heads in h2, etc                                                               -->
<!--=========================================================================-->
<h2><a name="overview">Overview</a></h2>

<p>This-a-here chapter is about this subject. Here is how you format code that is not "live."</p>

<pre class="code">
  &lt;connectiondatasource name="one"&gt;
      &lt;dataset name="message"&gt;
      &lt;dataset name="alert"&gt;
  &lt;/connectiondatasource&gt;

  &lt;connectiondatasource name="two"&gt;
      &lt;dataset name="stock"&gt;
      &lt;dataset name="alert"&gt;
  &lt;/connectiondatasource&gt;
</pre>


<p>Use the " code"<code>one.alert</code> tag to format code inline.</p>


<!--=========================================================================-->
<!-- Comments are appreciated!                                                  -->
<!--=========================================================================-->
<h2><a name="sometopic">Some Topic</a></h2>

<p>This is how to include "live" examples. </p>
<h3> <a name="subtopic1">subtopic1 </a></h3> 
<example class="code" title="Simple connection manager">
  &lt;canvas height="120" debug="true"&gt;
      &lt;connection /&gt;
      &lt;script&gt;
          Debug.write('my connection manager: ' + canvas.connection);
      &lt;/script&gt;
  &lt;/canvas&gt;
</example>

<!-- See other chapters in the D3 guide and also the wiki for more informtion on formatting chapters --> 
<!-- Here is a list of some topics you may want to discuss in this chapter-->

<fixme>
Configuring Tomcat to run over https. Ref bug 1939
You need to do the following to get SSL to work:

1. Enable SSL in tomcat/jetty.	This involves creating an SSL certificate.
2. Browse to a secure URL on tomcat and get your browser to accept you
newly created SSL certificate.	Since Flash doesn't give you this dialog
for secure requests, you'll need to do this or Flash's requests will
time out because the browser doesn't allow the secure connections to go
through.
3. run the attached https.lzx test case.
</fixme>
<fixme>
Ultimately, a Laszlo application is still using the HTTP protocol, and the
old Web request/response mechanism that is used in PIAs (Poor Internet
Applications).  However, in a Laszlo app, there is much more flexibility and
control over the requests and subsequent response data handling, since there
is a continuous user context within which to work. 

As such, managing dynamic data requests in a Laszlo application  can  be more
complex, since mechanisms like processing multiple asynchronous requests,
error handling, data optimization, etc. now have implications that are
unfamiliar to people accustomed only to the traditional browser environment.

For example -- if you click on an invalid URL in your browser, you're used
to seeing a big ugly 404 error message in your browser;  but this obviously
doesn't suffice in a client application that makes an invalid request. 
Handling the error gracefully and properly requires some thought.

Similarly, a Laszlo developer has total control over HTTP requests -- a
developer could certainly accidentally write an LZX program that makes
hundreds of errant requests without ever surfacing any error messages to the
user. 

While the language might be easy to use for simple applications, it also
offers unprecedented power in the Web environment for sophisticated apps,
requiring corresponding software engineering skills.

 What should I say in the Developer's Guide about how to
  determine what
 part of the program should be done client side and what part server
 side?  In particular I'm thinking about XML transforms and the like. 

There are many answers to this question - one answer is that for someone
looking to leverage an existing Web application infrastructure, any existing
business logic, validation, or data delivery can remain on the server-side,
while a new presentation layer can be constructed using Laszlo.

Beyond that, determining the division between client and server design and
implementation is not too different from that in traditional client/server
apps.  CPU load distribution, connectivity, UI responsiveness, developer
skillset are all considerations.

</fixme>
</body>
</html>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2004 Laszlo Systems, Inc.  All Rights Reserved.              *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->
